﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ProductManagement;

public partial class Modules_Purchase_ucRequestStatus : System.Web.UI.UserControl
{
    Products _products = new Products();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Session["Purchase_toSearch"] = "";
            ViewStatus();
        }
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        ViewStatus();
    }

    void ViewStatus()
    {
        DataSet dsRequestStatus = new DataSet();
//        _products.SearchMaterials("requeststatus", Session["Purchase_toSearch"].ToString(), out dsRequestStatus);

        gvwRequestStatus.DataSource = dsRequestStatus;
       // ShowGridColumns();
        gvwRequestStatus.DataBind();
       // HideGridColumns();
        Session["Purchase_dataset"] = dsRequestStatus;
    }
}
